<template>
  <el-table-column :="attrs" :prop="props.prop">
    <template #default="{ row }">
      <div>
        <div v-for="(item, index) in getList(row)" :key="index">
          {{ item.type }}/{{ item.no }}
        </div>
      </div>
    </template>
  </el-table-column>
</template>

<script setup lang="ts">
import { useAttrs } from 'vue'
const attrs = useAttrs()

interface Props {
  prop?: string;
}

const props = defineProps<Props>()

const getList = (row) => {
  if (!row || !row[props.prop]) return []
  return JSON.parse(row[props.prop])
}
</script>
